Repository navigation
Update testnet Asimov to phase4 deployment - #130
Conversation
- RPC URL → zksync-os-testnet-genlayer.zksync.dev - Add WSS endpoint - Update ConsensusMain, ConsensusData, Staking addresses - Add smoke tests for chain config and RPC connectivity
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughUpdates testnet Asimov chain configuration with new JSON-RPC and WebSocket endpoints, updates three contract addresses, and introduces a smoke test suite to validate chain configuration and RPC connectivity. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/chains/testnetAsimov.ts`:
- Around line 5-7: Remove the stale comment "// chains/localnet.ts" at the top
of the file so it no longer mislabels the file; leave the constants
TESTNET_JSON_RPC_URL and TESTNET_WS_URL intact (do not change their values)
ensuring only relevant comments remain above those constants.
In `@tests/smoke.test.ts`:
- Around line 18-28: The tests reference nullable properties directly; update
the assertions to use optional chaining like the existing stakingContract usage:
replace consensusMainContract.address with consensusMainContract?.address and
consensusDataContract.address with consensusDataContract?.address in the test
cases so the expressions are type-safe when those contract properties may be
null.
🧹 Nitpick comments (2)
tests/smoke.test.ts (2)
41-58: Live RPC tests will cause CI failures if the testnet is down.These tests make real network calls and will fail whenever the testnet is unreachable, making CI flaky. Consider gating them behind an environment variable (e.g.,
RUN_SMOKE_TESTS) or moving them to a separate test script/config so they don't block the main test suite.
42-48: Client can be shared across tests in this describe block.Both connectivity tests create identical public clients. Extract it to a
beforeAllor shared variable to reduce duplication.
| // chains/localnet.ts | ||
| const TESTNET_JSON_RPC_URL = "https://genlayer-testnet.rpc.caldera.xyz/http"; | ||
| const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev"; | ||
| const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws"; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n src/chains/testnetAsimov.ts | head -20Repository: genlayerlabs/genlayer-js
Length of output: 884
🏁 Script executed:
# Check if there are other chain files to compare patterns
fd -t f "chains/.*\.ts$" src/Repository: genlayerlabs/genlayer-js
Length of output: 50
🏁 Script executed:
# Search for similar RPC URL patterns in the codebase
rg "zksync-os-testnet" -A 2 -B 2Repository: genlayerlabs/genlayer-js
Length of output: 1008
Remove stale comment on line 5.
Line 5 contains // chains/localnet.ts, which is a leftover comment that doesn't apply to this file. The mismatched hostnames between the HTTP endpoint (zksync-os-testnet-genlayer) and WebSocket endpoint (zksync-os-testnet-alpha) are intentional per the test suite in tests/smoke.test.ts.
🔧 Fix the stale comment
-// chains/localnet.ts
+// Testnet Asimov RPC endpoints📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // chains/localnet.ts | |
| const TESTNET_JSON_RPC_URL = "https://genlayer-testnet.rpc.caldera.xyz/http"; | |
| const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev"; | |
| const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws"; | |
| // Testnet Asimov RPC endpoints | |
| const TESTNET_JSON_RPC_URL = "https://zksync-os-testnet-genlayer.zksync.dev"; | |
| const TESTNET_WS_URL = "wss://zksync-os-testnet-alpha.zksync.dev/ws"; |
🤖 Prompt for AI Agents
In `@src/chains/testnetAsimov.ts` around lines 5 - 7, Remove the stale comment "//
chains/localnet.ts" at the top of the file so it no longer mislabels the file;
leave the constants TESTNET_JSON_RPC_URL and TESTNET_WS_URL intact (do not
change their values) ensuring only relevant comments remain above those
constants.
Summary
zksync-os-testnet-genlayer.zksync.devwss://zksync-os-testnet-alpha.zksync.dev/wsTest plan
Summary by CodeRabbit
Release Notes
New Features
Tests